{if condition="$style eq 'fh'"} 
<form class="validate edit_from" novalidate="novalidate">

    <div class="row">   
        <div class="col-md-12">
            <div class="form-group">
                <label for="field-2" class="control-label">订单号</label>
                <input type="text" class="form-control" name="sn" placeholder="订单号" value="{$info.sn}" disabled="disabled">
            </div>  
        </div>
        <div class="col-md-8"> </div>
    </div>

    <div class="row">   
        <div class="col-md-4">
            <div class="form-group">
                <label for="field-2" class="control-label">制单人</label>
                <input type="text" class="form-control" name="author" placeholder="制单人" value="{$info.author}" disabled="disabled">
            </div>  
        </div>     
    </div>


    <table class="table table-striped table-bordered table-hover dataTable no-footer">
        <thead>
            <tr role="row">
                <th class="sorting_disabled" rowspan="1" colspan="1">
                    产品名称
                </th>
                <th class="sorting_disabled" rowspan="1" colspan="1">
                    采购数
                </th>
                <th class="sorting_disabled" rowspan="1" colspan="1">
                    仓库
                </th>
                <th class="sorting_disabled" rowspan="1" colspan="1">
                    采购价
                </th>
                <th class="sorting_disabled" rowspan="1" colspan="1">
                    采购渠道
                </th>
                <th class="sorting_disabled" rowspan="1" colspan="1">
                    出库申请单号
                </th>

            </tr>
        </thead>
        <tbody>

             {volist name='list' id='vo'}

                <tr role="row" class="odd">
                    <td> 
                        <input type="text" class="form-control" value="{$vo.findGood.name}" disabled="disabled"> 
                    </td>
                    <td><input type="text" class="form-control" value="{$vo.num}" disabled="disabled"></td>
                    <td><input type="text" class="form-control" value="{$vo.findStorage.id}" disabled="disabled"></td>
                    <td><input type="text" class="form-control" value="{$vo.cg_price}" disabled="disabled"></td>
                     <td><input type="text" class="form-control" value="{$vo.findSupplier.id}" disabled="disabled"> </td>
                     <td><input type="text" class="form-control" value="{$vo.out_order}" disabled="disabled"> </td>

                </tr>
             {/volist}
        </tbody>
    </table>

    <div class="row">
            <div class="col-md-4">
                <div class="form-group">
                    <label class="control-label">状态</label>
                    <input type="text" class="form-control" name="supplier" value="{$info.check_name}" disabled="disabled"> 
                </div>
            </div>    
            <div class="col-md-12" {neq name="info.check_status" value="2"} style="display:none" {/neq}>
                <div class="form-group no-margin">
                    <label for="field-7" class="control-label">驳回原因</label>
                    <textarea class="form-control autogrow" style="overflow: hidden; word-wrap: break-word; resize: horizontal; height: 50px;" disabled="disabled">{$info.mark}</textarea>
                </div>  
            </div>
    </div>
    <div class="row">
        <div class="col-md-12">
            <div class="form-group no-margin">
                <label for="field-7" class="control-label">发货备注</label>
                <textarea class="form-control autogrow" name="desc" placeholder="发货备注"
                style="overflow: hidden; word-wrap: break-word; resize: horizontal; height: 50px;">{$info.desc}</textarea>
            </div>  
        </div>
    </div>
    <div class="row">
         <input type="hidden" class="form-control" name="picture" id="picture" value="" > 
          <input type="hidden" name="id" value="{$info.id}">
          <input type="hidden" name="style" value="{$style}">
    <!--dom结构部分-->
        <div id="uploader-demo"  style="display:block;">
            <!--用来存放item-->
            <div id="fileList" class="uploader-list"></div>
            <div id="filePicker" style="border:1px solid #ccc;width:130px;height:130px;float:right;"></div>
        </div>

        <style>
            
            .webuploader-pick,.webuploader-pick img{
                display:block;
                width:100px;
                height:100px;
                background:url(__STATIC__/images/upload.png);
            }
        </style>

        <script src="__STATIC__/upload/webuploader.min.js"></script>
        <script>

            // 初始化Web Uploader
            var uploader = WebUploader.create({

                // 选完文件后，是否自动上传。
                auto: true,

                // swf文件路径
                swf: '__STATIC__' + '/upload/Uploader.swf',

                // 文件接收服务端。
                server: "{:url('upload')}",

                // 选择文件的按钮。可选。
                // 内部根据当前运行是创建，可能是input元素，也可能是flash.
                pick: '#filePicker',

                // 只允许选择图片文件。
                accept: {
                    title: 'Images',
                    extensions: 'gif,jpg,jpeg,bmp,png',
                    mimeTypes: 'image/*'
                }
            });

            // 文件上传成功，给item添加成功class, 用样式标记上传成功。
            uploader.on( 'uploadSuccess', function( file,response ) {
                // console.log(file);
                console.log(response);
                var tpl = '<img src=" __PUBLIC__/uploads/'+response+' "/>';
                $('.webuploader-pick').html(tpl);
                // $( '#'+file.id ).addClass('upload-state-done');
                $("#picture").val( '__PUBLIC__/uploads/'+response);
            });

        </script>
    </div>
    
</form>
{else/}

<form class="validate edit_from" novalidate="novalidate">

	<div class="row">	
		<div class="col-md-12">
			<div class="form-group">
				<label for="field-2" class="control-label">订单号</label>
				<input type="text" class="form-control" name="sn" placeholder="订单号" value="{$info.sn}" disabled="disabled">
			</div>	
		</div>
        <div class="col-md-8"> </div>
	</div>

    <div class="row">   
        <div class="col-md-4">
            <div class="form-group">
                <label for="field-2" class="control-label">制单人</label>
                <input type="text" class="form-control" name="author" placeholder="制单人" value="{$info.author}" disabled="disabled">
            </div>  
        </div>
       <!--  <div class="col-md-4">
            <div class="form-group">
                <label class="control-label">入库类型</label>
                <input type="text" class="form-control" name="type" placeholder="入库类型" value="{$info.type}" disabled="disabled"> 
            </div>
        </div>
        <div class="col-md-4">
            <div class="form-group">
                <label class="control-label">供应商</label>
                <input type="text" class="form-control" name="supplier" placeholder="供应商" value="{$info.supplier}" disabled="disabled"> 
            </div>
        </div>    -->     
    </div>


    <table class="table table-striped table-bordered table-hover dataTable no-footer">
        <thead>
            <tr role="row">
                <th class="sorting_disabled" rowspan="1" colspan="1">
                    产品名称
                </th>
                <th class="sorting_disabled" rowspan="1" colspan="1">
                    采购数
                </th>
                <th class="sorting_disabled" rowspan="1" colspan="1">
                    仓库
                </th>
                <th class="sorting_disabled" rowspan="1" colspan="1">
                    采购价
                </th>
                <th class="sorting_disabled" rowspan="1" colspan="1">
                    采购渠道
                </th>
                <th class="sorting_disabled" rowspan="1" colspan="1">
                    出库申请单号
                </th>
            </tr>
        </thead>
        <tbody>
            {volist name='list' id='voo'}
            <input type="hidden" class="form-control" value="{$voo.id}" name="listId[]">
            <tr role="row" class="odd order-list">
                <td>
                    <select name="product[]" class="form-control">
                        {volist name='product' id='vo'}
                        <option value="{$vo.id}" {if condition="$voo['good_id'] eq $vo.id"} selected="selected" {/if}>{$vo.name}</option>
                        {/volist}
                    </select> 
                </td>
                <td><input type="text" class="form-control" value="{$voo.num}" name="num[]"></td>
                <td> 
                    <select name="storage[]" class="form-control">
                        <option value="默认" >默认</option>
                        {volist name='storage' id='vo'}
                        <option value="{$vo.id}" {if condition="$voo['storage_id'] eq $vo.id"} selected="selected" {/if}>{$vo.name}</option>
                        {/volist}
                    </select> 
                </td>
                 <td><input type="text" class="form-control" value="{$voo.cg_price}" name="cg_price[]"></td>
                 <td> 
                    <select name="supplier[]" class="form-control">
                        <option value="默认" >默认</option>
                        {volist name='supplier' id='vo'}
                        <option value="{$vo.id}" {if condition="$voo['supplier'] eq $vo.id"} selected="selected" {/if}>{$vo.name}</option>
                        {/volist}
                    </select> 
                </td>
                <td><input type="text" class="form-control" value="{$voo.out_order}" name="out_order[]"></td>
            </tr>
             {/volist}
        </tbody>
       
    </table>



	<div class="row">
		<div class="col-md-12">
			<div class="form-group no-margin">
				<label for="field-7" class="control-label">备注</label>
				<textarea class="form-control autogrow" name="desc" placeholder="备注" disabled="disabled"
                style="overflow: hidden; word-wrap: break-word; resize: horizontal; height: 50px;">{$info.desc}</textarea>
			</div>	
		</div>
	</div>

     <div class="row">
        <input type="hidden" name="id" value="{$info.id}">
            <div class="col-md-12">
                <label class="control-label">审核</label>
                <select class="form-control" id="check_status" name="check_status">
                    <option value="0" {eq name="info.check_status" value="0"} selected="selected" {/eq}>待审核</option>
                    <option value="1" {eq name="info.check_status" value="1"} selected="selected" {/eq}>审核通过</option>
                    <option value="2" {eq name="info.check_status" value="2"} selected="selected" {/eq}>驳回</option>
                </select>  
            </div>
            <div class="col-md-12" id="mark" {neq name="info.check_status" value="2"} style="display:none" {/neq}>
                <div class="form-group no-margin">
                    <label for="field-7" class="control-label">驳回原因</label>
                    <textarea class="form-control autogrow" name="mark" placeholder="驳回原因" style="overflow: hidden; word-wrap: break-word; resize: horizontal; height: 50px;"></textarea>
                </div>  
            </div>
    </div>

	
</form>
<script>
    $("#check_status").change(function(){
        var check = $("#check_status").val();
        if (check == 2) {
            $("#mark").show();
        } else {
            $("#mark").hide();
        }
    })

    function add_list(obj){
        // $(obj).parent().parent().hide();
        $(obj).parent().parent().clone().appendTo( $(obj).parent().parent().parent() );
    }

    function del_list(obj){
        $(obj).parent().parent().remove();
    }
    
</script>
{/if}
